
import { ApiProperty, PartialType } from '@nestjs/swagger';
import { CreateRoleDto, CreateUserDto, RoleMenuActionDto } from './create-auth.dto';
import { IsNumber } from 'class-validator';


export class UpdateRoleMenuActionDto extends PartialType(RoleMenuActionDto){}

export class UpdateRoleDto extends PartialType(CreateRoleDto) {
    @IsNumber(
        {},
        {
            message: '缺少id',
        },
    )
    @ApiProperty({
        example: 0,
        type: 'int',
    })
    id: number;
}

export class UpdateUserDto extends PartialType(CreateUserDto) {
    @IsNumber({}, {
        message: '缺少id'
    })
    @ApiProperty({ description: '用户ID'})
    id: number;
}